var util = require('../../../utils/util.js');
var apiObject = require('../../../utils/api.js');

Page({

  data: {
    cart: '',
    newsList: []
  },

  onShow: function(e) {
    var that=this;
    util.request(apiObject.api.getNewsList).then(function (res) {
      console.log(res)
      if (res.code == 200) {
        that.setData({
          newsList: res.result.newsList
        })
      } else {
        util.showModal(res.message);
      }
    })

  },

 
  
})